﻿namespace ReactiveTest
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            IObservable<int> observable = new SimpleObservable();
            IObserver<int> observer = new SimpleObserver();

            IDisposable subscription = observable.Subscribe(observer);

            // 模拟消费数据100毫秒后取消订阅
            Thread.Sleep(100);
            subscription.Dispose();
        }
    }
}